<extend name="Layout/index"/>
<block name="main">
	<div class="pic-a-movie">
		<h3></h3>
		</div>	
		<div class="now-showing-list">
		<div class="col-md-12 movies-by-category movie-booking" style="text-align:center">
			<div id="collection" 
			 mid="<{$data.id}>" uid="<{$uid}>"
			<empty name="collection">
			style="width:100px;height:40px;background-color:rgba(1,0,0,0.2);line-height:40px;color:white;cursor:pointer;"
			<else/>
			style="width:100px;height:40px;background-color:rgba(235,97,32,0.5);line-height:40px;color:white;cursor:pointer;"
			</empty> >
			<empty name="collection">
			点击收藏
			
			<else/>
			已收藏
			</empty>
			</div>
			<div class="movie-ticket-book">
					<!-- <input type="checkbox" id="c1" name="cc"> -->
					<!-- <label class="lang">Hide Unavailable Shows</label> -->
					<img src="__ROOT__/Uploads/<{$icon.icon|substr=0,8}>/<{$icon.icon|substr=8}>" style="width:400px;">
					<div class="bahubali-details">
						<h4>上映日期:</h4>
						<p><{$data.showdate|date='Y/m/d',###}></p>
						<h4>时长:</h4>
						<p><{$data.duration}></p>
						<h4>导演:</h4>
						<p><{$data.director}></p>
						<h4>语言:</h4>
						<p><{$data.language}></p>
						<h4>类型:</h4>
						<p><{$cname}></p>
						<h4>演员:</h4>

						<p><volist name="list" id="vo"><{$vo.name}> &nbsp;</volist></p>
					</div>	
				</div>
				<br><br><br>
			<a href="<{:U('Buy/index',array('id'=>$data['id']))}>" class="btn btn-primary">查看场次</a>
			</div>
		
		</div>
		<div class="clearfix"></div><br><br>
		<div class="comments">
						<h5>看电影show态度</h5>
							<form action="<{:U('Detail/comment',array('id'=>$data['id']))}>" method="post">
								<textarea type="text" name="comment" placeholder="你的评论"></textarea>
								<input type="submit" value="提交" class="btn btn-success">
							</form>
						<volist name="comment" id="vo">
						<div class="comment">
							<div class="client">
								<empty name="vo.icon">
								<img src="__PUBLIC__/images/touxiang.jpg" alt="">
								<else/>
								<img src="__ROOT__/Uploads/<{$vo.icon|substr=0,8}>/<{$vo.icon|substr=8}>" alt="">
								</empty>
							</div>
							<div class="client-message">
								<p><a href="#">
									<empty name="vo.name">匿名
									<else/><{$vo.name}>
									</empty>
								</a><i class="fa fa-calendar"></i></p>
								<h6><{$vo.content}></h6>
							</div>
							<div class="clearfix"></div>
						</div>
						</volist>
						<{$show}>
					
					
				</div>

	</div>

		</div>
	<script>
		$(function(){
			$('#collection').click(
				function(){
					var	uid = $(this).attr('uid');
					var	mid = $(this).attr('mid');
					var	_this = $(this);
					if(uid == undefined || uid == '' || uid ==null){
						alert('请先登入');
					}else{
						$.ajax({
						type:"post",
						url:"<{:U('detail/collection')}>",
						data:{'uid':uid,'mid':mid,},
						success:function(data){
							// console.log(data.html);
							_this.css('background-color',data.bgc);
							_this.html(data.html);
							// console.log(data);
						},
						dataType:'json',
					})
					}
					
					
				}
				
				)
		})
	</script>


</block>	
